package com.sscl.easyble.interfaces.connections

import android.bluetooth.BluetoothGattCharacteristic

interface OnCharacteristicDataOptionsListener {
    /**
     * 读取到特征数据
     * @param gattState [android.bluetooth.BluetoothGatt.GATT_SUCCESS]表示操作成功
     */
    fun onCharacteristicRead(
        address: String,
        characteristic: BluetoothGattCharacteristic,
        value: ByteArray,
        gattState: Int
    )

    /**
     * 写入特征数据操作结果
     * @param gattState [android.bluetooth.BluetoothGatt.GATT_SUCCESS]表示操作成功
     */
    fun onCharacteristicWrite(
        address: String,
        characteristic: BluetoothGattCharacteristic,
        gattState: Int
    )

    /**
     * 特征数据通知
     */
    fun onCharacteristicNotify(
        address: String,
        characteristic: BluetoothGattCharacteristic,
        value: ByteArray
    )
}